<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: util/util_fwd.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Public API.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_23ec12649285f9fabf3a6b7380226c28.html">util</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">util_fwd.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceflow"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html">flow</a></td></tr>
<tr class="memdesc:namespaceflow"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceflow_1_1util"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html">flow::util</a></td></tr>
<tr class="memdesc:namespaceflow_1_1util"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceflow_1_1util_1_1this__thread"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util_1_1this__thread.html">flow::util::this_thread</a></td></tr>
<tr class="memdesc:namespaceflow_1_1util_1_1this__thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for standard this-thread namespace. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a4b8c54b789ea3bbc1dedebbff084625c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="util__fwd_8hpp.html#a4b8c54b789ea3bbc1dedebbff084625c">FLOW_UTIL_WHERE_AM_I</a>()</td></tr>
<tr class="memdesc:a4b8c54b789ea3bbc1dedebbff084625c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Expands to an <code>ostream</code> fragment <code>X</code> (suitable for, for example: <code>std::cout &lt;&lt; X &lt;&lt; ": Hi!"</code>) containing the file name, function name, and line number at the macro invocation's context.  <a href="util__fwd_8hpp.html#a4b8c54b789ea3bbc1dedebbff084625c">More...</a><br /></td></tr>
<tr class="separator:a4b8c54b789ea3bbc1dedebbff084625c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cc4c82ac54e53b7a8a2431b66ff30df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="util__fwd_8hpp.html#a0cc4c82ac54e53b7a8a2431b66ff30df">FLOW_UTIL_WHERE_AM_I_STR</a>()</td></tr>
<tr class="memdesc:a0cc4c82ac54e53b7a8a2431b66ff30df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <a class="el" href="util__fwd_8hpp.html#a4b8c54b789ea3bbc1dedebbff084625c" title="Expands to an ostream fragment X (suitable for, for example: std::cout &lt;&lt; X &lt;&lt; &quot;: Hi!...">FLOW_UTIL_WHERE_AM_I()</a> but evaluates to an <code>std::string</code>.  <a href="util__fwd_8hpp.html#a0cc4c82ac54e53b7a8a2431b66ff30df">More...</a><br /></td></tr>
<tr class="separator:a0cc4c82ac54e53b7a8a2431b66ff30df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a402a1fb61d3fe4ca6767729e38620d6d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="util__fwd_8hpp.html#a402a1fb61d3fe4ca6767729e38620d6d">FLOW_UTIL_SEMICOLON_SAFE</a>(ARG_func_macro_definition)</td></tr>
<tr class="memdesc:a402a1fb61d3fe4ca6767729e38620d6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use this to create a semicolon-safe version of a "void" functional macro definition consisting of at least two statements; or of one statement that would become two statements by appending a semicolon.  <a href="util__fwd_8hpp.html#a402a1fb61d3fe4ca6767729e38620d6d">More...</a><br /></td></tr>
<tr class="separator:a402a1fb61d3fe4ca6767729e38620d6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:af030c3119f060a9630afca31098a78a5"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#af030c3119f060a9630afca31098a78a5">flow::util::Thread</a> = boost::thread</td></tr>
<tr class="memdesc:af030c3119f060a9630afca31098a78a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for standard thread class.  <a href="namespaceflow_1_1util.html#af030c3119f060a9630afca31098a78a5">More...</a><br /></td></tr>
<tr class="separator:af030c3119f060a9630afca31098a78a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a4e7b2d3107bd630e0dc0c0b8f2e4de"><td class="memItemLeft" align="right" valign="top"><a id="a0a4e7b2d3107bd630e0dc0c0b8f2e4de" name="a0a4e7b2d3107bd630e0dc0c0b8f2e4de"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Thread_id</b> = Thread::id</td></tr>
<tr class="memdesc:a0a4e7b2d3107bd630e0dc0c0b8f2e4de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for an OS-provided ID of a <a class="el" href="namespaceflow_1_1util.html#af030c3119f060a9630afca31098a78a5" title="Short-hand for standard thread class.">util::Thread</a>. <br /></td></tr>
<tr class="separator:a0a4e7b2d3107bd630e0dc0c0b8f2e4de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3e89a8a271b0ddc76ac2a0ce488dea4"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#ac3e89a8a271b0ddc76ac2a0ce488dea4">flow::util::Task_engine</a> = boost::asio::io_context</td></tr>
<tr class="memdesc:ac3e89a8a271b0ddc76ac2a0ce488dea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for boost.asio event service, the central class of boost.asio.  <a href="namespaceflow_1_1util.html#ac3e89a8a271b0ddc76ac2a0ce488dea4">More...</a><br /></td></tr>
<tr class="separator:ac3e89a8a271b0ddc76ac2a0ce488dea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa59354ab408e978c8a7bda1a4706924e"><td class="memItemLeft" align="right" valign="top"><a id="aa59354ab408e978c8a7bda1a4706924e" name="aa59354ab408e978c8a7bda1a4706924e"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Strand</b> = Task_engine::strand</td></tr>
<tr class="memdesc:aa59354ab408e978c8a7bda1a4706924e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for boost.asio strand, an ancillary class that works with <a class="el" href="namespaceflow_1_1util.html#ac3e89a8a271b0ddc76ac2a0ce488dea4" title="Short-hand for boost.asio event service, the central class of boost.asio.">Task_engine</a> for advanced task scheduling. <br /></td></tr>
<tr class="separator:aa59354ab408e978c8a7bda1a4706924e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7416d64d2989051104bb396e28e15e6"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#ae7416d64d2989051104bb396e28e15e6">flow::util::Timer</a> = boost::asio::basic_waitable_timer&lt; Fine_clock &gt;</td></tr>
<tr class="memdesc:ae7416d64d2989051104bb396e28e15e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">boost.asio timer.  <a href="namespaceflow_1_1util.html#ae7416d64d2989051104bb396e28e15e6">More...</a><br /></td></tr>
<tr class="separator:ae7416d64d2989051104bb396e28e15e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab22fd89e165a9e6deaa174bc0dfdc8de"><td class="memItemLeft" align="right" valign="top"><a id="ab22fd89e165a9e6deaa174bc0dfdc8de" name="ab22fd89e165a9e6deaa174bc0dfdc8de"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Auto_cleanup</b> = boost::shared_ptr&lt; void &gt;</td></tr>
<tr class="memdesc:ab22fd89e165a9e6deaa174bc0dfdc8de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper type for <a class="el" href="namespaceflow_1_1util.html#a09a032f8e1e77a3afc0b7df115a773e1" title="Provides a way to execute arbitrary (cleanup) code at the exit of the current block.">setup_auto_cleanup()</a>. <br /></td></tr>
<tr class="separator:ab22fd89e165a9e6deaa174bc0dfdc8de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1b28edb7bad743c1c77f6b982cc3196"><td class="memItemLeft" align="right" valign="top"><a id="af1b28edb7bad743c1c77f6b982cc3196" name="af1b28edb7bad743c1c77f6b982cc3196"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Udp_endpoint</b> = boost::asio::ip::udp::endpoint</td></tr>
<tr class="memdesc:af1b28edb7bad743c1c77f6b982cc3196"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for the UDP endpoint (IP/port) type. <br /></td></tr>
<tr class="separator:af1b28edb7bad743c1c77f6b982cc3196"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a331b3b73d9d633101d6f0ebc1c829701"><td class="memItemLeft" align="right" valign="top"><a id="a331b3b73d9d633101d6f0ebc1c829701" name="a331b3b73d9d633101d6f0ebc1c829701"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Ip_address_v4</b> = boost::asio::ip::address_v4</td></tr>
<tr class="memdesc:a331b3b73d9d633101d6f0ebc1c829701"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for the IPv4 address type. <br /></td></tr>
<tr class="separator:a331b3b73d9d633101d6f0ebc1c829701"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ed0f6ab85f5df463bb10913b0764540"><td class="memItemLeft" align="right" valign="top"><a id="a2ed0f6ab85f5df463bb10913b0764540" name="a2ed0f6ab85f5df463bb10913b0764540"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Ip_address_v6</b> = boost::asio::ip::address_v6</td></tr>
<tr class="memdesc:a2ed0f6ab85f5df463bb10913b0764540"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for the IPv6 address type. <br /></td></tr>
<tr class="separator:a2ed0f6ab85f5df463bb10913b0764540"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add6ade273326f27eaf9bfd170a909626"><td class="memItemLeft" align="right" valign="top"><a id="add6ade273326f27eaf9bfd170a909626" name="add6ade273326f27eaf9bfd170a909626"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Mutex_non_recursive</b> = boost::mutex</td></tr>
<tr class="memdesc:add6ade273326f27eaf9bfd170a909626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for non-reentrant, exclusive mutex. ("Reentrant" = one can lock an already-locked-in-that-thread mutex.) <br /></td></tr>
<tr class="separator:add6ade273326f27eaf9bfd170a909626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c7a5df07c2e86c788de9e6bbaee77d5"><td class="memItemLeft" align="right" valign="top"><a id="a9c7a5df07c2e86c788de9e6bbaee77d5" name="a9c7a5df07c2e86c788de9e6bbaee77d5"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>flow::util::Mutex_recursive</b> = boost::recursive_mutex</td></tr>
<tr class="memdesc:a9c7a5df07c2e86c788de9e6bbaee77d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for reentrant, exclusive mutex. <br /></td></tr>
<tr class="separator:a9c7a5df07c2e86c788de9e6bbaee77d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62b5ba6d6a549ac20e2c055e72bef421"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421">flow::util::Mutex_shared_non_recursive</a> = boost::shared_mutex</td></tr>
<tr class="memdesc:a62b5ba6d6a549ac20e2c055e72bef421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for non-reentrant, shared-or-exclusive mutex.  <a href="namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421">More...</a><br /></td></tr>
<tr class="separator:a62b5ba6d6a549ac20e2c055e72bef421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeee121f0277371517fd2f5c3a20d8112"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#aeee121f0277371517fd2f5c3a20d8112">flow::util::Mutex_noop_shared_non_recursive</a> = boost::null_mutex</td></tr>
<tr class="memdesc:aeee121f0277371517fd2f5c3a20d8112"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for a mutex type equivalent to <a class="el" href="namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421" title="Short-hand for non-reentrant, shared-or-exclusive mutex.">util::Mutex_shared_non_recursive</a> &ndash; except that the lock/unlock mutex ops all do nothing.  <a href="namespaceflow_1_1util.html#aeee121f0277371517fd2f5c3a20d8112">More...</a><br /></td></tr>
<tr class="separator:aeee121f0277371517fd2f5c3a20d8112"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d2247b715da63e4b960909561b90ae7"><td class="memTemplParams" colspan="2">template&lt;typename Mutex &gt; </td></tr>
<tr class="memitem:a5d2247b715da63e4b960909561b90ae7"><td class="memTemplItemLeft" align="right" valign="top">using&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a5d2247b715da63e4b960909561b90ae7">flow::util::Lock_guard</a> = boost::unique_lock&lt; Mutex &gt;</td></tr>
<tr class="memdesc:a5d2247b715da63e4b960909561b90ae7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for advanced-capability RAII lock guard for any mutex, ensuring exclusive ownership of that mutex.  <a href="namespaceflow_1_1util.html#a5d2247b715da63e4b960909561b90ae7">More...</a><br /></td></tr>
<tr class="separator:a5d2247b715da63e4b960909561b90ae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4f0492f15f46f70581feac50b9217ee"><td class="memTemplParams" colspan="2">template&lt;typename Shared_mutex &gt; </td></tr>
<tr class="memitem:ac4f0492f15f46f70581feac50b9217ee"><td class="memTemplItemLeft" align="right" valign="top">using&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#ac4f0492f15f46f70581feac50b9217ee">flow::util::Shared_lock_guard</a> = boost::shared_lock&lt; Shared_mutex &gt;</td></tr>
<tr class="memdesc:ac4f0492f15f46f70581feac50b9217ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for <em>shared mode</em> advanced-capability RAII lock guard, particuarly for <a class="el" href="namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421" title="Short-hand for non-reentrant, shared-or-exclusive mutex.">Mutex_shared_non_recursive</a> mutexes.  <a href="namespaceflow_1_1util.html#ac4f0492f15f46f70581feac50b9217ee">More...</a><br /></td></tr>
<tr class="separator:ac4f0492f15f46f70581feac50b9217ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9495b3e37e9d27bcc7767a4b6ce87ff4"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a9495b3e37e9d27bcc7767a4b6ce87ff4">flow::util::Lock_guard_non_recursive</a> = boost::unique_lock&lt; Mutex_non_recursive &gt;</td></tr>
<tr class="memdesc:a9495b3e37e9d27bcc7767a4b6ce87ff4"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Deprecated given C++1x) Short-hand for advanced-capability RAII lock guard for <a class="el" href="namespaceflow_1_1util.html#add6ade273326f27eaf9bfd170a909626" title="Short-hand for non-reentrant, exclusive mutex. (&quot;Reentrant&quot; = one can lock an already-locked-in-that-...">Mutex_non_recursive</a> mutexes.  <a href="namespaceflow_1_1util.html#a9495b3e37e9d27bcc7767a4b6ce87ff4">More...</a><br /></td></tr>
<tr class="separator:a9495b3e37e9d27bcc7767a4b6ce87ff4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a015b84cfa3076b8e75d16ec44a5514a3"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a015b84cfa3076b8e75d16ec44a5514a3">flow::util::Lock_guard_recursive</a> = boost::unique_lock&lt; Mutex_recursive &gt;</td></tr>
<tr class="memdesc:a015b84cfa3076b8e75d16ec44a5514a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Deprecated given C++1x) Short-hand for advanced-capability RAII lock guard for <a class="el" href="namespaceflow_1_1util.html#a9c7a5df07c2e86c788de9e6bbaee77d5" title="Short-hand for reentrant, exclusive mutex.">Mutex_recursive</a> mutexes.  <a href="namespaceflow_1_1util.html#a015b84cfa3076b8e75d16ec44a5514a3">More...</a><br /></td></tr>
<tr class="separator:a015b84cfa3076b8e75d16ec44a5514a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a689388b6eb7e760933d99381d65cacca"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a689388b6eb7e760933d99381d65cacca">flow::util::Lock_guard_shared_non_recursive_sh</a> = boost::shared_lock&lt; Mutex_shared_non_recursive &gt;</td></tr>
<tr class="memdesc:a689388b6eb7e760933d99381d65cacca"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Deprecated given C++1x) Short-hand for <em>shared mode</em> advanced-capability RAII lock guard for <a class="el" href="namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421" title="Short-hand for non-reentrant, shared-or-exclusive mutex.">Mutex_shared_non_recursive</a> mutexes.  <a href="namespaceflow_1_1util.html#a689388b6eb7e760933d99381d65cacca">More...</a><br /></td></tr>
<tr class="separator:a689388b6eb7e760933d99381d65cacca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9df3cc2f3aec0c0353443b9d6c81e638"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a9df3cc2f3aec0c0353443b9d6c81e638">flow::util::Lock_guard_shared_non_recursive_ex</a> = boost::unique_lock&lt; Mutex_shared_non_recursive &gt;</td></tr>
<tr class="memdesc:a9df3cc2f3aec0c0353443b9d6c81e638"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Deprecated given C++1x) Short-hand for <em>exclusive mode</em> advanced-capability RAII lock guard for <a class="el" href="namespaceflow_1_1util.html#a62b5ba6d6a549ac20e2c055e72bef421" title="Short-hand for non-reentrant, shared-or-exclusive mutex.">Mutex_shared_non_recursive</a> mutexes.  <a href="namespaceflow_1_1util.html#a9df3cc2f3aec0c0353443b9d6c81e638">More...</a><br /></td></tr>
<tr class="separator:a9df3cc2f3aec0c0353443b9d6c81e638"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e5fae573be960434c4c9dacd48c9c11"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a9e5fae573be960434c4c9dacd48c9c11">flow::util::Lock_guard_noop_shared_non_recursive_sh</a> = boost::shared_lock&lt; Mutex_noop_shared_non_recursive &gt;</td></tr>
<tr class="memdesc:a9e5fae573be960434c4c9dacd48c9c11"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Deprecated given C++1x) Equivalent to <a class="el" href="namespaceflow_1_1util.html#a689388b6eb7e760933d99381d65cacca" title="(Deprecated given C++1x) Short-hand for shared mode advanced-capability RAII lock guard for Mutex_sha...">Lock_guard_shared_non_recursive_sh</a> but applied to <a class="el" href="namespaceflow_1_1util.html#aeee121f0277371517fd2f5c3a20d8112" title="Short-hand for a mutex type equivalent to util::Mutex_shared_non_recursive – except that the lock/unl...">Mutex_noop_shared_non_recursive</a>.  <a href="namespaceflow_1_1util.html#a9e5fae573be960434c4c9dacd48c9c11">More...</a><br /></td></tr>
<tr class="separator:a9e5fae573be960434c4c9dacd48c9c11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add56211dee74c212c19028f1ded2a785"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#add56211dee74c212c19028f1ded2a785">flow::util::Lock_guard_noop_shared_non_recursive_ex</a> = boost::unique_lock&lt; Mutex_noop_shared_non_recursive &gt;</td></tr>
<tr class="memdesc:add56211dee74c212c19028f1ded2a785"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Deprecated given C++1x) Equivalent to <a class="el" href="namespaceflow_1_1util.html#a9df3cc2f3aec0c0353443b9d6c81e638" title="(Deprecated given C++1x) Short-hand for exclusive mode advanced-capability RAII lock guard for Mutex_...">Lock_guard_shared_non_recursive_ex</a> but applied to <a class="el" href="namespaceflow_1_1util.html#aeee121f0277371517fd2f5c3a20d8112" title="Short-hand for a mutex type equivalent to util::Mutex_shared_non_recursive – except that the lock/unl...">Mutex_noop_shared_non_recursive</a>.  <a href="namespaceflow_1_1util.html#add56211dee74c212c19028f1ded2a785">More...</a><br /></td></tr>
<tr class="separator:add56211dee74c212c19028f1ded2a785"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9bec37057b3abab90a9732d293116e5b"><td class="memTemplParams" colspan="2">template&lt;typename Key , typename Mapped , typename Hash , typename Pred &gt; </td></tr>
<tr class="memitem:a9bec37057b3abab90a9732d293116e5b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a9bec37057b3abab90a9732d293116e5b">flow::util::swap</a> (Linked_hash_map&lt; Key, Mapped, Hash, Pred &gt; &amp;val1, Linked_hash_map&lt; Key, Mapped, Hash, Pred &gt; &amp;val2)</td></tr>
<tr class="memdesc:a9bec37057b3abab90a9732d293116e5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>val1.swap(val2)</code>.  <a href="namespaceflow_1_1util.html#a9bec37057b3abab90a9732d293116e5b">More...</a><br /></td></tr>
<tr class="separator:a9bec37057b3abab90a9732d293116e5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7fd808e839d422a3f74fbea57fe367e"><td class="memTemplParams" colspan="2">template&lt;typename Key , typename Hash , typename Pred &gt; </td></tr>
<tr class="memitem:ac7fd808e839d422a3f74fbea57fe367e"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#ac7fd808e839d422a3f74fbea57fe367e">flow::util::swap</a> (Linked_hash_set&lt; Key, Hash, Pred &gt; &amp;val1, Linked_hash_set&lt; Key, Hash, Pred &gt; &amp;val2)</td></tr>
<tr class="memdesc:ac7fd808e839d422a3f74fbea57fe367e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>val1.swap(val2)</code>.  <a href="namespaceflow_1_1util.html#ac7fd808e839d422a3f74fbea57fe367e">More...</a><br /></td></tr>
<tr class="separator:ac7fd808e839d422a3f74fbea57fe367e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad92ad411feccf73908abe6ed130d48f5"><td class="memItemLeft" align="right" valign="top">boost::chrono::microseconds&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#ad92ad411feccf73908abe6ed130d48f5">flow::util::time_since_posix_epoch</a> ()</td></tr>
<tr class="memdesc:ad92ad411feccf73908abe6ed130d48f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current POSIX (Unix) time as a duration from the Epoch time point.  <a href="namespaceflow_1_1util.html#ad92ad411feccf73908abe6ed130d48f5">More...</a><br /></td></tr>
<tr class="separator:ad92ad411feccf73908abe6ed130d48f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa132928b364caefca5c3821e019924bf"><td class="memTemplParams" colspan="2">template&lt;typename Const_buffer_sequence &gt; </td></tr>
<tr class="memitem:aa132928b364caefca5c3821e019924bf"><td class="memTemplItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#aa132928b364caefca5c3821e019924bf">flow::util::buffers_to_ostream</a> (std::ostream &amp;os, const Const_buffer_sequence &amp;data, const std::string &amp;indentation, size_t bytes_per_line=0)</td></tr>
<tr class="memdesc:aa132928b364caefca5c3821e019924bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a multi- or single-line string representation of the provided binary data to an output stream, complete with a printable and hex versions of each byte.  <a href="namespaceflow_1_1util.html#aa132928b364caefca5c3821e019924bf">More...</a><br /></td></tr>
<tr class="separator:aa132928b364caefca5c3821e019924bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16357344c21456b86b7de3085e2661a2"><td class="memTemplParams" colspan="2">template&lt;typename Const_buffer_sequence &gt; </td></tr>
<tr class="memitem:a16357344c21456b86b7de3085e2661a2"><td class="memTemplItemLeft" align="right" valign="top">std::string&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a16357344c21456b86b7de3085e2661a2">flow::util::buffers_dump_string</a> (const Const_buffer_sequence &amp;data, const std::string &amp;indentation, size_t bytes_per_line=0)</td></tr>
<tr class="memdesc:a16357344c21456b86b7de3085e2661a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identical to <a class="el" href="namespaceflow_1_1util.html#aa132928b364caefca5c3821e019924bf" title="Writes a multi- or single-line string representation of the provided binary data to an output stream,...">buffers_to_ostream()</a> but returns an <code>std::string</code> instead of writing to a given <code>ostream</code>.  <a href="namespaceflow_1_1util.html#a16357344c21456b86b7de3085e2661a2">More...</a><br /></td></tr>
<tr class="separator:a16357344c21456b86b7de3085e2661a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f681afaf67a0f917cf43a7ae893a015"><td class="memTemplParams" colspan="2">template&lt;typename Time_unit , typename N_items &gt; </td></tr>
<tr class="memitem:a0f681afaf67a0f917cf43a7ae893a015"><td class="memTemplItemLeft" align="right" valign="top">double&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a0f681afaf67a0f917cf43a7ae893a015">flow::util::to_mbit_per_sec</a> (N_items items_per_time, size_t bits_per_item=8)</td></tr>
<tr class="memdesc:a0f681afaf67a0f917cf43a7ae893a015"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility that converts a bandwidth in arbitrary units in both numerator and denominator to the same bandwidth in megabits per second.  <a href="namespaceflow_1_1util.html#a0f681afaf67a0f917cf43a7ae893a015">More...</a><br /></td></tr>
<tr class="separator:a0f681afaf67a0f917cf43a7ae893a015"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b7316b3ed6d89f54c91e17c2aab101e"><td class="memTemplParams" colspan="2">template&lt;typename Integer &gt; </td></tr>
<tr class="memitem:a6b7316b3ed6d89f54c91e17c2aab101e"><td class="memTemplItemLeft" align="right" valign="top">Integer&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a6b7316b3ed6d89f54c91e17c2aab101e">flow::util::ceil_div</a> (Integer dividend, Integer divisor)</td></tr>
<tr class="memdesc:a6b7316b3ed6d89f54c91e17c2aab101e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the result of the given non-negative integer divided by a positive integer, rounded up to the nearest integer.  <a href="namespaceflow_1_1util.html#a6b7316b3ed6d89f54c91e17c2aab101e">More...</a><br /></td></tr>
<tr class="separator:a6b7316b3ed6d89f54c91e17c2aab101e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09a032f8e1e77a3afc0b7df115a773e1"><td class="memTemplParams" colspan="2">template&lt;typename Cleanup_func &gt; </td></tr>
<tr class="memitem:a09a032f8e1e77a3afc0b7df115a773e1"><td class="memTemplItemLeft" align="right" valign="top">Auto_cleanup&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a09a032f8e1e77a3afc0b7df115a773e1">flow::util::setup_auto_cleanup</a> (const Cleanup_func &amp;func)</td></tr>
<tr class="memdesc:a09a032f8e1e77a3afc0b7df115a773e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a way to execute arbitrary (cleanup) code at the exit of the current block.  <a href="namespaceflow_1_1util.html#a09a032f8e1e77a3afc0b7df115a773e1">More...</a><br /></td></tr>
<tr class="separator:a09a032f8e1e77a3afc0b7df115a773e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab10bc9e8bef148f875aa743fe0852743"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:ab10bc9e8bef148f875aa743fe0852743"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#ab10bc9e8bef148f875aa743fe0852743">flow::util::in_closed_range</a> (T const &amp;min_val, T const &amp;val, T const &amp;max_val)</td></tr>
<tr class="memdesc:ab10bc9e8bef148f875aa743fe0852743"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if and only if the given value is within the given range, inclusive.  <a href="namespaceflow_1_1util.html#ab10bc9e8bef148f875aa743fe0852743">More...</a><br /></td></tr>
<tr class="separator:ab10bc9e8bef148f875aa743fe0852743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a024ddda9acb2b66f2a1b35cdb0c016aa"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a024ddda9acb2b66f2a1b35cdb0c016aa"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a024ddda9acb2b66f2a1b35cdb0c016aa">flow::util::in_closed_open_range</a> (T const &amp;min_val, T const &amp;val, T const &amp;max_val)</td></tr>
<tr class="memdesc:a024ddda9acb2b66f2a1b35cdb0c016aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if and only if the given value is within the given range, given as a [low, high) pair.  <a href="namespaceflow_1_1util.html#a024ddda9acb2b66f2a1b35cdb0c016aa">More...</a><br /></td></tr>
<tr class="separator:a024ddda9acb2b66f2a1b35cdb0c016aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ae762ea4f743a98a73953d7f9ec2164"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a8ae762ea4f743a98a73953d7f9ec2164"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a8ae762ea4f743a98a73953d7f9ec2164">flow::util::in_open_closed_range</a> (T const &amp;min_val, T const &amp;val, T const &amp;max_val)</td></tr>
<tr class="memdesc:a8ae762ea4f743a98a73953d7f9ec2164"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if and only if the given value is within the given range, given as a (low, high] pair.  <a href="namespaceflow_1_1util.html#a8ae762ea4f743a98a73953d7f9ec2164">More...</a><br /></td></tr>
<tr class="separator:a8ae762ea4f743a98a73953d7f9ec2164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a733448fee07c2a77e343a3f1590ff82e"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a733448fee07c2a77e343a3f1590ff82e"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a733448fee07c2a77e343a3f1590ff82e">flow::util::in_open_open_range</a> (T const &amp;min_val, T const &amp;val, T const &amp;max_val)</td></tr>
<tr class="memdesc:a733448fee07c2a77e343a3f1590ff82e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if and only if the given value is within the given range, given as a (low, high) pair.  <a href="namespaceflow_1_1util.html#a733448fee07c2a77e343a3f1590ff82e">More...</a><br /></td></tr>
<tr class="separator:a733448fee07c2a77e343a3f1590ff82e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03984e29450abf9cf287c501d6c8f866"><td class="memTemplParams" colspan="2">template&lt;typename Container &gt; </td></tr>
<tr class="memitem:a03984e29450abf9cf287c501d6c8f866"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a03984e29450abf9cf287c501d6c8f866">flow::util::key_exists</a> (const Container &amp;container, const typename Container::key_type &amp;key)</td></tr>
<tr class="memdesc:a03984e29450abf9cf287c501d6c8f866"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if and only if the given key is present at least once in the given associative container.  <a href="namespaceflow_1_1util.html#a03984e29450abf9cf287c501d6c8f866">More...</a><br /></td></tr>
<tr class="separator:a03984e29450abf9cf287c501d6c8f866"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34ed70fa4de81a4fdb9234bfb5a3a914"><td class="memTemplParams" colspan="2">template&lt;typename Minuend , typename Subtrahend &gt; </td></tr>
<tr class="memitem:a34ed70fa4de81a4fdb9234bfb5a3a914"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a34ed70fa4de81a4fdb9234bfb5a3a914">flow::util::subtract_with_floor</a> (Minuend *minuend, const Subtrahend &amp;subtrahend, const Minuend &amp;floor=0)</td></tr>
<tr class="memdesc:a34ed70fa4de81a4fdb9234bfb5a3a914"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs <code>*minuend -= subtrahend</code>, subject to a floor of <code>floor</code>.  <a href="namespaceflow_1_1util.html#a34ed70fa4de81a4fdb9234bfb5a3a914">More...</a><br /></td></tr>
<tr class="separator:a34ed70fa4de81a4fdb9234bfb5a3a914"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67eecb5096dabfaff3d02c419b304540"><td class="memTemplParams" colspan="2">template&lt;typename From , typename To &gt; </td></tr>
<tr class="memitem:a67eecb5096dabfaff3d02c419b304540"><td class="memTemplItemLeft" align="right" valign="top">size_t&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a67eecb5096dabfaff3d02c419b304540">flow::util::size_unit_convert</a> (From num_froms)</td></tr>
<tr class="memdesc:a67eecb5096dabfaff3d02c419b304540"><td class="mdescLeft">&#160;</td><td class="mdescRight">Answers the question <em>what's the smallest integer number of <code>To</code>s sufficient to verbatim store the given number of <code>From</code>s?</em>, where <code>From</code> and <code>To</code> are POD types.  <a href="namespaceflow_1_1util.html#a67eecb5096dabfaff3d02c419b304540">More...</a><br /></td></tr>
<tr class="separator:a67eecb5096dabfaff3d02c419b304540"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a002c9a2f7629dfe3fdfa5632eda30dbd"><td class="memTemplParams" colspan="2">template&lt;typename Map , typename Sequence &gt; </td></tr>
<tr class="memitem:a002c9a2f7629dfe3fdfa5632eda30dbd"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a002c9a2f7629dfe3fdfa5632eda30dbd">flow::util::sequence_to_inverted_lookup_map</a> (Sequence const &amp;src_seq, Map *target_map)</td></tr>
<tr class="memdesc:a002c9a2f7629dfe3fdfa5632eda30dbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a generic sequence (integer -&gt; object) generates a generic map (object -&gt; integer) providing inverse lookup.  <a href="namespaceflow_1_1util.html#a002c9a2f7629dfe3fdfa5632eda30dbd">More...</a><br /></td></tr>
<tr class="separator:a002c9a2f7629dfe3fdfa5632eda30dbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a873d1abeac7a29822e940adf4f06c9"><td class="memTemplParams" colspan="2">template&lt;typename Map , typename Sequence &gt; </td></tr>
<tr class="memitem:a0a873d1abeac7a29822e940adf4f06c9"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a0a873d1abeac7a29822e940adf4f06c9">flow::util::sequence_to_inverted_lookup_map</a> (Sequence const &amp;src_seq, Map *target_map, const Function&lt; typename Map::mapped_type(size_t)&gt; &amp;idx_to_map_val_func)</td></tr>
<tr class="memdesc:a0a873d1abeac7a29822e940adf4f06c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Similar to the 2-arg overload of <a class="el" href="namespaceflow_1_1util.html#a0a873d1abeac7a29822e940adf4f06c9" title="Similar to the 2-arg overload of sequence_to_inverted_lookup_map() but with the ability to store a va...">sequence_to_inverted_lookup_map()</a> but with the ability to store a value based on the index into the input sequence instead of that index itself.  <a href="namespaceflow_1_1util.html#a0a873d1abeac7a29822e940adf4f06c9">More...</a><br /></td></tr>
<tr class="separator:a0a873d1abeac7a29822e940adf4f06c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8afd30c50bcd670d45442df49d1da484"><td class="memTemplParams" colspan="2">template&lt;typename ... T&gt; </td></tr>
<tr class="memitem:a8afd30c50bcd670d45442df49d1da484"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a8afd30c50bcd670d45442df49d1da484">flow::util::ostream_op_to_string</a> (std::string *target_str, T const &amp;... ostream_args)</td></tr>
<tr class="memdesc:a8afd30c50bcd670d45442df49d1da484"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes to the specified string, as if the given arguments were each passed, via <code>&lt;&lt;</code> in sequence, to an <code>ostringstream</code>, and then the result were appended to the aforementioned string variable.  <a href="namespaceflow_1_1util.html#a8afd30c50bcd670d45442df49d1da484">More...</a><br /></td></tr>
<tr class="separator:a8afd30c50bcd670d45442df49d1da484"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a685b86585da2fa5186f51854e7ae1561"><td class="memTemplParams" colspan="2">template&lt;typename ... T&gt; </td></tr>
<tr class="memitem:a685b86585da2fa5186f51854e7ae1561"><td class="memTemplItemLeft" align="right" valign="top">std::string&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a685b86585da2fa5186f51854e7ae1561">flow::util::ostream_op_string</a> (T const &amp;... ostream_args)</td></tr>
<tr class="memdesc:a685b86585da2fa5186f51854e7ae1561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <a class="el" href="namespaceflow_1_1util.html#a8afd30c50bcd670d45442df49d1da484" title="Writes to the specified string, as if the given arguments were each passed, via &lt;&lt; in sequence,...">ostream_op_to_string()</a> but returns a new <code>string</code> by value instead of writing to the caller's <code>string</code>.  <a href="namespaceflow_1_1util.html#a685b86585da2fa5186f51854e7ae1561">More...</a><br /></td></tr>
<tr class="separator:a685b86585da2fa5186f51854e7ae1561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af92e6183c2071f4166d4b5a91f50d70c"><td class="memTemplParams" colspan="2">template&lt;typename T1 , typename ... T_rest&gt; </td></tr>
<tr class="memitem:af92e6183c2071f4166d4b5a91f50d70c"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#af92e6183c2071f4166d4b5a91f50d70c">flow::util::feed_args_to_ostream</a> (std::ostream *os, T1 const &amp;ostream_arg1, T_rest const &amp;... remaining_ostream_args)</td></tr>
<tr class="memdesc:af92e6183c2071f4166d4b5a91f50d70c"><td class="mdescLeft">&#160;</td><td class="mdescRight">"Induction step" version of variadic function template that simply outputs arguments 2+ via <code>&lt;&lt;</code> to the given <code>ostream</code>, in the order given.  <a href="namespaceflow_1_1util.html#af92e6183c2071f4166d4b5a91f50d70c">More...</a><br /></td></tr>
<tr class="separator:af92e6183c2071f4166d4b5a91f50d70c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ce0e3794a3a84dd26b4aa7b013f6276"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a3ce0e3794a3a84dd26b4aa7b013f6276"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a3ce0e3794a3a84dd26b4aa7b013f6276">flow::util::feed_args_to_ostream</a> (std::ostream *os, T const &amp;only_ostream_arg)</td></tr>
<tr class="memdesc:a3ce0e3794a3a84dd26b4aa7b013f6276"><td class="mdescLeft">&#160;</td><td class="mdescRight">"Induction base" for a variadic function template, this simply outputs given item to given <code>ostream</code> via <code>&lt;&lt;</code>.  <a href="namespaceflow_1_1util.html#a3ce0e3794a3a84dd26b4aa7b013f6276">More...</a><br /></td></tr>
<tr class="separator:a3ce0e3794a3a84dd26b4aa7b013f6276"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18a29d6a6e65c3b96c52b5cad5971266"><td class="memTemplParams" colspan="2">template&lt;typename Enum &gt; </td></tr>
<tr class="memitem:a18a29d6a6e65c3b96c52b5cad5971266"><td class="memTemplItemLeft" align="right" valign="top">Enum&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266">flow::util::istream_to_enum</a> (std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding=true, bool case_sensitive=false, Enum enum_lowest=Enum(0))</td></tr>
<tr class="memdesc:a18a29d6a6e65c3b96c52b5cad5971266"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes an <code>enum class</code> value from a standard input stream.  <a href="namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266">More...</a><br /></td></tr>
<tr class="separator:a18a29d6a6e65c3b96c52b5cad5971266"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0955a29930075ac1fe393896c089b911"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a0955a29930075ac1fe393896c089b911">flow::util::beautify_chrono_ostream</a> (std::ostream *os)</td></tr>
<tr class="memdesc:a0955a29930075ac1fe393896c089b911"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets certain <code>chrono</code>-related formatting on the given <code>ostream</code> that results in a consistent, desirable output of <code>duration</code>s and certain types of <code>time_point</code>s.  <a href="namespaceflow_1_1util.html#a0955a29930075ac1fe393896c089b911">More...</a><br /></td></tr>
<tr class="separator:a0955a29930075ac1fe393896c089b911"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a418b56a178c07100eef78da5c9d6ee7a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1util.html#a418b56a178c07100eef78da5c9d6ee7a">flow::util::deep_size</a> (const std::string &amp;val)</td></tr>
<tr class="memdesc:a418b56a178c07100eef78da5c9d6ee7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Estimate of memory footprint of the given value, including memory allocated on its behalf &ndash; but excluding its shallow <code>sizeof</code>! &ndash; in bytes.  <a href="namespaceflow_1_1util.html#a418b56a178c07100eef78da5c9d6ee7a">More...</a><br /></td></tr>
<tr class="separator:a418b56a178c07100eef78da5c9d6ee7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a402a1fb61d3fe4ca6767729e38620d6d" name="a402a1fb61d3fe4ca6767729e38620d6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a402a1fb61d3fe4ca6767729e38620d6d">&#9670;&nbsp;</a></span>FLOW_UTIL_SEMICOLON_SAFE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_UTIL_SEMICOLON_SAFE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ARG_func_macro_definition</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">  <span class="keywordflow">do</span> \</div>
<div class="line">  { \</div>
<div class="line">    ARG_func_macro_definition \</div>
<div class="line">  } \</div>
<div class="line">  while (<span class="keyword">false</span>)</div>
</div><!-- fragment -->
<p>Use this to create a semicolon-safe version of a "void" functional macro definition consisting of at least two statements; or of one statement that would become two statements by appending a semicolon. </p>
<p >There may be other use cases where it might be useful, though none more has come to mind as of this writing. Loosely speaking, IF your sub-statements are always blocks, and you have a "void" functional macro to be used in the typical way (every use is a statement that looks like a function call), and the macro's definition is anything <em>other</em> than an expression with an intentionally missing trailing semicolon, THEN you should probably wrap that would-be macro definition in a <a class="el" href="util__fwd_8hpp.html#a402a1fb61d3fe4ca6767729e38620d6d" title="Use this to create a semicolon-safe version of a &quot;void&quot; functional macro definition consisting of at ...">FLOW_UTIL_SEMICOLON_SAFE()</a>. However, read on if you want to know rationale and/or formalities.</p>
<h3>Formal use case requirements</h3>
<p >The following is assumed about every <em>use</em> of this macro; behavior is undefined otherwise.</p>
<ul>
<li>The macro's invocation is the <em>entire definition</em> of another macro, M.</li>
<li>M is a functional macro taking 0 or more arguments (possibly variadic).</li>
<li><p class="startli">The following is true about every <em>use</em> of the macro M:</p><ul>
<li>The invocation is written as if M is a free function in the C language, and it is being "called" as the <em>entirety</em> of the statement containing that "call." That is, it must look like this:</li>
</ul>
<div class="fragment"><div class="line">M(...arg 1 value..., ...arg 2 value..., ...more...); <span class="comment">// (Or however many args M actually allows.)</span></div>
</div><!-- fragment --></li>
</ul>
<h3>Known use case 1: Macro definition is 2+ statements</h3>
<p >Suppose your macro's value is a series of two or more statements executing in series without braces <code>{}</code> around the whole thing. Then, in some contexts, invoking that macro as intended might result in unexpected runtime misbehavior that the compiler wouldn't detect. A simple example with two expressions as individual statements:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define DOUBLE_AND_PRINT(arg) \</span></div>
<div class="line"><span class="preprocessor">  arg *= 2;    </span><span class="comment">// Statement 1. \</span></div>
<div class="line"><span class="comment">  cout &lt;&lt; arg  // Statement 2.  Note the lacking trailing semicolon (invoker must supply it after &quot;call&quot;). \</span></div>
<div class="line"><span class="comment">DOUBLE_AND_PRINT(x); // No problem. Both statements execute.</span></div>
<div class="line"><span class="keywordflow">if</span> (some_flag)</div>
<div class="line">  DOUBLE_AND_PRINT(x); <span class="comment">// UNINTENDED BEHAVIOR!  Statement 2 executes regardless of some_flag!</span></div>
</div><!-- fragment --><p >Granted, if the invoker used braces appropriately around the <code>if</code> statement body, there'd be no issue, but one cannot always rely on invoker's good style, especially if the macro is part of a public library API. Solution:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define DOUBLE_AND_PRINT(arg) \</span></div>
<div class="line"><span class="preprocessor">  FLOW_UTIL_SEMICOLON_SAFE \</span></div>
<div class="line"><span class="preprocessor">  ( \</span></div>
<div class="line"><span class="preprocessor">    arg *= 2;    </span><span class="comment">// Statement 1. \</span></div>
<div class="line"><span class="comment">    cout &lt;&lt; arg; // Statement 2.  Note necessity for trailing semicolon. \</span></div>
<div class="line"><span class="comment">  )</span></div>
<div class="line">DOUBLE_AND_PRINT(x); <span class="comment">// No problem.  Both statements execute.</span></div>
<div class="line"><span class="keywordflow">if</span> (some_flag)</div>
<div class="line">  DOUBLE_AND_PRINT(x); <span class="comment">// No problem.  Both statements execute; or neither one does.</span></div>
</div><!-- fragment --><p >One might ask: Why not simply surround the 2+ statements with braces <code>{}</code> to eliminate the problem more simply? Answer: This actually would turn the use case into the following other problematic use case.</p>
<h3>Known use case 2: Required semicolon <code>;</code> trailing macro invocation leads to syntax error</h3>
<p >Recall that the premise <em>requires</em> invoker to call your macro M like <code>M();</code>, meaning they will <em>always</em> put a semicolon after the invocation. Now suppose that doing so will turn one statement (which is M's definition) into two. Another way of putting it: Suppose M's body is already a complete statement, even without the required trailing <code>;</code> (and there is no way to make it otherwise; usually [always?] because it ends with a <code>}</code>). Then in some contexts it'll cause a syntax error. Example:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define CHECK_AND_LOG(msg) \</span></div>
<div class="line"><span class="preprocessor">  if (filter()) \</span></div>
<div class="line"><span class="preprocessor">  { \</span></div>
<div class="line"><span class="preprocessor">    log(msg); \</span></div>
<div class="line"><span class="preprocessor">  } </span><span class="comment">// Semicolon will always be added right here.</span></div>
<div class="line">CHECK_AND_LOG(<span class="stringliteral">&quot;Hello.&quot;</span>); <span class="comment">// No problem.  The empty ; statement introduced is harmless.</span></div>
<div class="line"><span class="keywordflow">if</span> (terminating)</div>
<div class="line">  CHECK_AND_LOG(msg); <span class="comment">// SYNTAX ERROR!  The empty ; will make the `else` illegal.</span></div>
<div class="line"><span class="keywordflow">else</span></div>
<div class="line">  exit();</div>
</div><!-- fragment --><p >Removing the <code>;</code> from the invocation is no solution. Firstly it'll confuse many editors that will think the "function call" (really macro invocation) is missing the usual semicolon. This might cause incorrect auto-indentation in the file and who knows what else. Code analyzer tools may also be affected. Even ignoring issues where the code is fed into a non-compiler, there are possible flow control problems. In this example it'll attach the <code>else</code> in the invoking code to the inner <code>if</code> (from the macro) instead of the outer <code>if</code> (in the invoking code) as intended. Wrapping the body of <code>CHECK_AND_LOG()</code> in the proposed wrapper will resolve all stated problems. (Solution code omitted for brevity and obviousness at this point.)</p>
<dl class="section note"><dt>Note</dt><dd>Adding this wrapper would slightly adversely affect performance in the complete absence of compiler optimization, but even the most basic optimizer (one capable of eliminating <code>if (false)</code> and similar) should entirely eliminate any such performance degradation.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ARG_func_macro_definition</td><td>The intended value of a functional macro, such that the "function" it approximates would have return type <code>void</code>. Behavior is undefined if the value of this parameter ends in a semicolon, or if the value contains a statement that includes another statement within it that is not a block (<code>{ ... }</code>). (The rules in the last [English] statement may or may not be strictly necessary, but requiring these allows me to generalize/reason more straightforwardly. In any case, one rule is assumed good style anyway, while the other is simply practical in this context.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Code to be used as the entire definition of a macro whose definition would have been <code>ARG_func_macro_definition</code> if not for the resulting compile error or unexpected flow control effects detailed above. </dd></dl>

</div>
</div>
<a id="a4b8c54b789ea3bbc1dedebbff084625c" name="a4b8c54b789ea3bbc1dedebbff084625c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b8c54b789ea3bbc1dedebbff084625c">&#9670;&nbsp;</a></span>FLOW_UTIL_WHERE_AM_I</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_UTIL_WHERE_AM_I</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">  FLOW_UTIL_WHERE_AM_I_FROM_ARGS(::flow::util::get_last_path_segment \</div>
<div class="line">                                   (<a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">::flow::util::String_view</a>(__FILE__, <span class="keyword">sizeof</span>(__FILE__) - 1)), \</div>
<div class="line">                                 <a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">::flow::util::String_view</a>(__FUNCTION__, <span class="keyword">sizeof</span>(__FUNCTION__) - 1), \</div>
<div class="line">                                 __LINE__)</div>
<div class="ttc" id="anamespaceflow_1_1util_html_ae4dc52186797094b3040379ff19124c9"><div class="ttname"><a href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">flow::util::String_view</a></div><div class="ttdeci">Basic_string_view&lt; char &gt; String_view</div><div class="ttdoc">Commonly used char-based Basic_string_view. See its doc header.</div><div class="ttdef"><b>Definition:</b> string_view.hpp:191</div></div>
</div><!-- fragment -->
<p>Expands to an <code>ostream</code> fragment <code>X</code> (suitable for, for example: <code>std::cout &lt;&lt; X &lt;&lt; ": Hi!"</code>) containing the file name, function name, and line number at the macro invocation's context. </p>
<p >It's a functional macro despite taking no arguments to convey that it mimics a free function sans args. </p>

</div>
</div>
<a id="a0cc4c82ac54e53b7a8a2431b66ff30df" name="a0cc4c82ac54e53b7a8a2431b66ff30df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0cc4c82ac54e53b7a8a2431b66ff30df">&#9670;&nbsp;</a></span>FLOW_UTIL_WHERE_AM_I_STR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_UTIL_WHERE_AM_I_STR</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">  ::flow::util::get_where_am_i_str(::flow::util::get_last_path_segment \</div>
<div class="line">                                     (<a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">::flow::util::String_view</a>(__FILE__, <span class="keyword">sizeof</span>(__FILE__) - 1)), \</div>
<div class="line">                                   <a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">::flow::util::String_view</a>(__FUNCTION__, <span class="keyword">sizeof</span>(__FUNCTION__) - 1), \</div>
<div class="line">                                   __LINE__)</div>
</div><!-- fragment -->
<p>Same as <a class="el" href="util__fwd_8hpp.html#a4b8c54b789ea3bbc1dedebbff084625c" title="Expands to an ostream fragment X (suitable for, for example: std::cout &lt;&lt; X &lt;&lt; &quot;: Hi!...">FLOW_UTIL_WHERE_AM_I()</a> but evaluates to an <code>std::string</code>. </p>
<p >It's probably a bit slower as well. Update: In fact, it's probably significantly slower as of this writing, as <a class="el" href="util__fwd_8hpp.html#a4b8c54b789ea3bbc1dedebbff084625c" title="Expands to an ostream fragment X (suitable for, for example: std::cout &lt;&lt; X &lt;&lt; &quot;: Hi!...">FLOW_UTIL_WHERE_AM_I()</a> evaluates the <code>&lt;&lt;</code>ed items at compile-time, while this cannot due to how it's implemented. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:32 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
